package com.qd.common.panda.domain.entity.rule;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalTime;

/**
 * 分时段按小时计费，如“白天（8点至24点），每小时5元，夜间（24点至8点），每小时3元。不足半小时按半小时计费，超过半小时按1小时计费
 * [{
 * "start": "00:00:00",
 * "end": "08:00:00",
 * "price": 300
 * }, {
 * "start": "08:00:00",
 * "end": "23:59:59",
 * "price": 500
 * }]
 * }
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class Rule4DTO extends BaseRuleDTO {
    private LocalTime start;
    private LocalTime end;

    @Override
    public void freeData() {
        this.start = null;
        this.end = null;
        super.freeData();
    }
}